-- GENERATED SPELL FOR [Captain Iskandar] --


function spell0_27567(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42724,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27567', 632, 1)
end

function spell1_27567(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27567', 5250, 1)
end

function spell2_27567(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_27567', 567, 1)
end

function spell3_27567(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_27567', 2000, 1)
end

function Sorts_27567(pUnit, Event)
local choix_sorts_27567 = math.random(0, 3)
if choix_sorts_27567 == 0 then
pUnit:RegisterEvent('spell0_27567', 1, 1)
end
if choix_sorts_27567 == 1 then
pUnit:RegisterEvent('spell1_27567', 1, 1)
end
if choix_sorts_27567 == 2 then
pUnit:RegisterEvent('spell2_27567', 1, 1)
end
if choix_sorts_27567 == 3 then
pUnit:RegisterEvent('spell3_27567', 1, 1)
end
end

function mob27567_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27567', math.random(1500, 3000), 1)
end

function mob27567_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27567_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27567_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27567, 1, 'mob27567_Action')
RegisterUnitEvent(27567, 2, 'mob27567_Leave')
RegisterUnitEvent(27567, 3, 'mob27567_Kill')
RegisterUnitEvent(27567, 4, 'mob27567_Die')
